"""
系统配置数据模型
"""
from sqlalchemy import Column, String, Text, Boolean
from models.base import BaseModel


class SystemConfig(BaseModel):
    """系统配置模型"""
    __tablename__ = "system_configs"
    
    config_key = Column(String(100), unique=True, nullable=False, comment="配置键")
    config_value = Column(Text, comment="配置值")
    config_type = Column(String(20), default="string", comment="配置类型")
    description = Column(Text, comment="配置描述")
    is_public = Column(Boolean, default=False, comment="是否公开")
    category = Column(String(50), comment="配置分类")
    
    def __repr__(self):
        return f"<SystemConfig(id={self.id}, key='{self.config_key}')>"